<?php include _include(APP_PATH.'view/htm/header.inc.htm');?>

<!--{hook forum_start.htm}-->

<div class="row">
	<div class="col-lg-12 main">
		<!--{hook forum_breadcrumb_before.htm}-->
		<?php if(empty($hide_breadcrumb)) { ?>
		<ol class="breadcrumb d-none d-md-flex">
			<li class="qimeng_btn breadcrumb-item"><a href="./"><i class="icon-home" aria-hidden="true"></i></a></li>
			<li class="qimeng_btn breadcrumb-item active"><a href="<?php echo url("forum-$fid");?>"><?php echo $forum['name'];?></a></li>
			<!--{hook forum_breadcrumb.htm}-->
		</ol>
		<?php } ?>
		<!--{hook qimeng_bbs_after.htm}-->	
		<!--{hook forum_breadcrumb_after.htm}-->
		<div class="card card-threadlist">
			<div class="card-header d-flex justify-content-between">
				<ul class="nav nav-tabs card-header-tabs">
					<li class="nav-item">
						<a class="nav-link <?php echo $active == 'default' ? 'active' : '';?>" href="<?php echo url("forum-$fid");?>"><?php echo lang('new_thread');?></a>
					</li>
					<!--{hook forum_thread_list_nav_item_after.htm}-->
				</ul>
				<!--{hook forum_thread_list_dropdown_before.htm}-->
				<div class="text-right text-small pt-1 card-header-dropdown">
					<div class="btn-toolbar" role="toolbar">
						<span class="text-muted"><?php echo lang('orderby');?>：</span>		
								<!--{hook forum_thread_list_dropdown_toggle.htm}-->
						<a class="" rel="nofollow" href="<?php echo url("forum-$fid-1", array('orderby'=>'tid') + $extra);?>"><i class="icon-orderby <?php echo $orderby == 'tid' ? 'icon-orderby-tid-active' : '';?>" title="<?php echo lang('thread_create_date');?>"></i></a>&nbsp; 
				        <a class="" rel="nofollow" href="<?php echo url("forum-$fid-1", array('orderby'=>'lastpid') + $extra);?>"><i class="icon-orderby <?php echo $orderby == 'lastpid' ? 'icon-orderby-tid-active' : '';?>" title="<?php echo lang('post_create_date');?>"></i></a>
							    <!--{hook forum_thread_list_dropdown_menu.htm}-->

					</div>
				</div>
				<!--{hook forum_thread_list_dropdown_after.htm}-->
			</div>
			<div class="card-body">
				<ul class="list-unstyled threadlist mb-0">
					<!--{hook forum_threadlist_before.htm}-->
					<?php include _include(APP_PATH.'view/htm/thread_list.inc.htm');?>
					<!--{hook forum_threadlist_after.htm}-->
				</ul>
			</div>
		</div>

		<?php include _include(APP_PATH.'view/htm/thread_list_mod.inc.htm');?>
		
		<!--{hook forum_page_before.htm}-->
		<nav class="my-3"><ul class="pagination justify-content-center flex-wrap"><?php echo $pagination; ?></ul></nav>
		<!--{hook forum_page_after.htm}-->
	</div>
	
<!--{hook forum_end.htm}-->

<?php include _include(APP_PATH.'view/htm/footer.inc.htm');?>

<script>
$('li[data-active="fid-<?php echo $fid;?>"]').addClass('active');
</script>

<!--{hook forum_js.htm}-->